deque interface implemented and tested