separated api and client