removed duplicate code in server.go