Add line recognition