rewrite single line body if statements to be one line if statements
rewrite end while to use kernel#loop