Added back in flush, added sleep