updated the testing code