preliminarily working to produce output from which an mrci is usable. sql queries reasonable with minor error