refactoring dx api