Adding method to modify result before and after format and fixing formatResults method.