update instructions and fix nullpointer exception