rewrote queue table setup