use visitor to analyze source
refactor for code rule