adjust brackets on while loops