Added getTree method - related to #10