added rest consolidation functionality when a rest is added