re-organized api and calls