use a transform call to simplify the coercion to factor