refactoring server. Add input form