converted to phonegap