added extreme values math