minor modify on pattern md