added pi_to_nth