tree resizes based on depth