removed some unused logic