queue refactor wip