optimize lib/index && command