encapsulate isCommandRejected function