Queue function definitions