used example from phonegap site