renamed helper to toXXX to match function names elsewhere