delete blank character
refactoring the server code