re-wrote the loader build process