add TODO features, and fix a shell error