removed comments and unused variables