update for phonegap