refactor testclass, then add support for read data from files