get rid of check for first result
change min and max to ulong
add -c (count) argument