add hook to compute unless and command