more judgement in all-calculation;
some update in linear analyze , which is correct now!