drawLine function