finished queue.c with testing