added IP-retrieve/validate function to the helper