reorgnaized the code of method analayzer