added some more min max stuff
merged