added ip location func