cleanup legacy code