refactor flush
add unit test
Merge branch 'develop' into flush-feature
add sscan/sflush