continued work on script to insert matrices into db