Started work on generating matrices