refactor analyses