extracting function for testing results