Well I would hope you could see that by using copyTree you would remove the need for this entire if statement.