An intention to kill is a totally different thing from an ulterior motive to kill.A may have the urge of revenge as his ulterior motive at the back of his mind.This is immaterial.What is important is his awarense that his act of shooting at B will result in B's death.Moreover A's intention only to inflict grevious bodily harm can also render him liable for murder and not manslaughter.It seems in theory that anything less than the two types of intent is not adequate to make the killing murder.The only punishment prescribed by law for murder is imprisonment for life.