Add withTags function
Add tests for withTags