Renamed newpath to path, unused variable