input: refactoring