resolved nullpointer exception