resiude work with naive method