work-in-progress some input refactoring