test cases modified to include max and min