Can you add some scaladoc to describe what this is used for and how it works?