Making queue system more efficient