Updated old function for backwards compatibility.