updated to use Loader