start incorporating queue code into mainline