update server.R

code cleaning