implementing server routines