a few changes on the prepare matrix for the next step