make the min/max functions inlines