added checks if single ip or a range