Begin to implement TASK4: lottery scheduler