found and commented out code that generates nullpointers