updates schema to use ref, zips response, adds a test, needs global db or something