better Queue implementation with more tests