modify refactor
added api calls