better working version of RandomizedQueue and more unit tests