trying to get it working on phonegap