add method to get ip address