added some comments and a frame for the actual testing loop