updated command handling interface and TODO