added api to main