added two more methods to interval class