updated ajax to display and remove loading icon when busy