debugged error in testing