implement server functionality