cleaned up code aesthetically