removed some unnecessary variables