change testing structure to separate test code to production code