rewrote huggle queue

previous code almost made me puke