add customCommandPrepare method.