Due to the interesting usage of this function, better add a description here.