added a bunch of bug and path functionality