This is a tricky method. What unit tests do we have for it? Should we make an issue to add more tests after the PR?