client states was fixed, basic server functions was added