modified input.c