adjusted implementation of the round-robin thingie