refactor no server, adicao de comentarios