added javascript part