refactoring loader & generic test