refactor tagging out to lib