whenever I try to re-implement my network chk it crashes with a null pointer exception