nit: add a comment: `// consider splitting this method for the different use cases`