Added functions to queue.c