change end to flush