fixed bug in QueueArray and made enqueue and dequeue fxns similar in structure