follow logic of nbgm_replayer and add some subclauses