having trouble with null pointer in part 4