first round of initialization  working with server