Added onComplete callback