refine code, add todo command