refactor for analysis check