added conf option for number of loops