rearrange loading flow