Added first k mean. Need to port code to the generation of the matrix: