Added rthpi functionality