refactoring the code to handle API call to find game outcome status