Rewrote methods to handle null pointer exception