It seems to me that this function is not used anymore, so it should be removed.