adding test to legacy code