adding missing dependency
cleaning up sloppy code