Modified constructor for Path