changed localstorage to key value store
changed phonegap check