table has only 4 elements, correction in for()