Adding a queue to deal with the waiting resources