added api and script