updated readTest method to receive a dataHandler as optional parameter