Made Queue more general