fixing bugs in the queue and adding binary tree data structure