added case insensitive option to input handler