separated format code in task view to separate function to avoid duplicated code
preparations for merge into iteration 1