This func needs to be documented.