I am sure stack and queue implementation are correct, yet they dont work