formatting, remove superfluous space at end of string when printing, change C for-loops into CFA for-loops