replaced use of inet_ntoa with inet_ntop