api abstraction