added queueing functionality and slightly modified .h by adding functions and modyfying some return values