added loading and dismiss animation