remove legacy code