refact loader