corrected a/b testing function. split app.js into dev and prod versions