Updated old legacy code