added new logic
client work correctly