my subroutine is faster for big and fat matrix