added parseInt() to resolve hasWon() error