updated phonegap code so that it works with radius