added tests . remove debugging statement