finished loader function
Merged