separated some patterns into constants