added behavior to input.c