add test.aic & solved several bugs