add first api logic