all api stuff pretty much done