block wrapping for trees modified