more generic flush command