Add randomNH in common.h/cpp