get ip using function