added conversion from IP to class c subnet