tree work and code modification