use fail_unless within loop