Using a cond in main loop for better readbility