removed a few unused variables