pass arguments correctly to client constructor