changed BUFF_INFINITY to a static const and made it use double max.