Added ip address detection