Modified input listener