```
    for(int i = 0; i < Board.NUM_OF_ROWS; i++) {
        for(int j = 0; j < Board.NUM_OF_COLS; j++) {
            if(piece.canMove(board, piece.getX(), piece.getY(), i, j)) {
                mappedPosition.put(i, j);
            }
        }
    }

```

In this code, I am trying to add a pair of (x,y) coordinate of a movable Position of a chess "piece". 

For example, I was expecting it to add [2,2], [2,4], [3,1], [3,5], [5,1], [5,5], [6,2], [6,4]

But when I use put, it overwrites the Value when it has the same Key. So [2,2] just becomes [2,4] eventually. 

How can I get the full list of the pair without overwriting it?