Changed the input behavior, and also now using closures