coordinates API refactor