modified test one pattern code
added more test codes