input handler now takes ints instead of chars