implementing pegasi