removed commented code and added doc comments