removed extra unused variables