uncommented actual code and removed test code