working version of line tracker