#1 prepare legacy code for testing