minor correction, removed some unnecessary code