trying to put spaces between tags and fix edge case where no tags messes things up