added test for flush