reset index in setLine - now setLine can be called again and again to change path dynamically
Merge pull request #13 from pkaushik/master

now setLine can be called over and over to update path dynamically