some unused functions & commented code deleted.