replay modified by wangliang