Maybe this is nitpicking, but our general coding style here would be to place a line of
```
if (!replace.position.contains(obj.position)) continue;
```
before these two ```if```s.