added logging
put server in a module