added uniform random matrix function