Changed addTag javascript