updated loading logic from URL