before server refactor