null pointer exception removed