short script for mangling some matricies together