refactoring to appreciate a multi-threaded implementation of pairwise
mapping.
cast exception from when neither a in-built nor custom matrix is
provided.