cleaned up code, comments