updated to take ip from user input