added pattern2.js