add ip location func