Updated queue functions