added a loading state and updated the examples