added javascript structure in wrong branch