program working, all pragmas added except for in transpose function - correctness of this must be tested if/when implemented.