Added isElementInRange to elements