Added code to detect IP address and got two way communication final