refactored for usage of callbacks with server-ctrl