fill in some server pseudocode