added spinner and ajax