refactoring of setup, some additional attributes to api client