add loading icon
update sample code