modified: apt.py & cmd.py