added loading dialog and select all option