Got tree working properly