add round robin scheduling, fix some other things