updated for phonegap