cmd pattern