SERVER: refactoring