implmented loading animation