removed some comments and unused function