remove unnecessary cuts