added completeHandler function and key