Added matrix macros