clean up sloppy code