we could use some comments here explaining how this works.