queue implementation complete