refactored round robin a bit