converting to marshal
adding marshal funcs for ipv4