Expanding DrawLine function