attempt to add phonegap funtionality