refactor method fold