new version as class with more functionality ip location