created validation functions, got rid of the *ip* and *mask* special variables