cleaned up code, done code review