not breaking if 0 loops is passed as parameter