Update after refactoring api