Added parameters to the path method and fix print method