added api and layout