implemented schema with separate collection for tags and messages