generating matrix