Wrote wrapper for outputting results to database, tested successfully