refactor WeakCommand