changed type return of dequeue