identity matrix function and test formatting