updating javascript for tags