implemented custom tree layout for visualization