Added changes to the old functions