Please document this function properly.