centralised the loading modal