purr refactor