GCD to perform task in main thread