fixed error in program and checked to see if it works correctly