format with while on new line