exercise for legacy code course