changing the files path and correcting some codes