code save before gs_dispatcher