added some utility functions to help with analysis of results