refactored tree type to avoid conflicts.