added loading handler, onComplete event