adding loading directive