move queue to its own class