added codes for loop functions to EWSUSY.cpp.