finish mostly function about analyze