Update database models and querying
almost done