netmask calculator with classes