improved way to get package version.