modify script and add feature that allows to check the winner