porting to phonegap build