Created Pattern Matrix Class