fix partition method.but not finished