refactor nas loader