Changing the loading function