adds loading spinner