Remake table using for-loop