added a loading spinner