move input transformation to trait