refactoring to FileLottery Object