separated api portion and client portion