need to fix the regex!
IP validation, refactoring