added legacy code