Life sentence given to man convicted of murder