refactoring input tests