refactroing agent move