start refactoring RPL