changed to cache input line