Revert "Replaced some statements by a table comprehension"

This reverts commit 5d762c2259cbd3b622284273fd1d888028ccf76f.