implemented flush_all()
Merge branch 'flush_all'