cleaned up code and removed unused variables