fixed legacy code - now there is a cmake file that should work in the legacy directory