I don’t understand why my hero pick up the coin with the lowest value/distance rating. Any help?

```
loop:
bestCoin = None
maxRating = 0
coinIndex = 0
coins = self.findItems()
while coinIndex < len(coins):
coin = coins[coinIndex]
distance = self.distanceTo(coin)
value = coin.value
coinIndex = coinIndex + 1
if value/distance > maxRating:
maxRating = value
bestCoin = coin
if bestCoin:
self.moveXY(bestCoin.pos.x, bestCoin.pos.y)
```