replacing the spaces in the tags with hyphens