I have no idea what the purpose of this function is, please document it o_o