cleaned up code a bunch