cleaned up some sloppy code