database formatting and minor updates
queue logic