adding legacy code