implement round robin scheduling algorithm and helper methods