cost depth and balance need to be fixed