simulation for queue functionality