add function "dispatch_from_main_queue"