delete queue function