added loading dialog