prise: Algorithm fo