refactored flush method to test deployment