fix pass algo