reset flow srot algorithm