extract extreme values