calling onComplete only once