Uses Tree Data Structure