adding the code required to create and assign tags