refactor input-transform