This code now mimics the behaviour I want to see in the loader