Refactored input
Refactored input