Updates isInside function.