adjust code tree