explanation for how this works