refactored some server code
merge