tree layout implemented