updated models and rebuilt database to work with queues