use of trackX and trackY in the drawingLine function