Added functions which supports drawing of tree