refactor analyze