added code for Path class