simplifying Input handler