ypr functions