Refactor new API