refactoring code analyse_method