register server function