new style
put server reply to logs
a bit refactored