refactored tags, created tests