better flush scheduling