added the code which handles test data