added api init handler