added api functionality