added third, fourth, etc. as well as max and min
add third, fourth etc. as well as max and min