added code to not allow duplicate tags