hook for updating server