Added code to generate the first profile matrices