Added queue functionality