removed some unnecessary code