rt api refactoring