removed a few unnecessary variables