adding prevention for calling next multiple times