refactoring api - get