some stuff before phonegap.