legacy code complexity