adding derivative line tracking