using Float.MAX_VALUE instead of just a big number