minor fix and added some documentation
fixed error.added loading indicator