replace functions ypr with XML