first putting in big mat
take out submat func