another restructuring to couple validation and conversion