refactors a methods into utils