peak algorithm isolated