implementing server functions