Added support for previous line matching