move wait for task methods to NSObject