implemented loading indicator