removing debug statements
Refactoring for the changes suggested