logica do client