added dequeing functionality