refactor: api