added range selection and x tree drawing