added scripts to get patterns