adding more codes but nullpointer persists