template fetch matrix element