refactoring away c+11 lambda syntax in favor of a matrix of function
pointers