factor out Loader.