get ip method