added drawPath function with 2 paramters