Updated legacy code