fixin bug in the method make_path