exercise #4, dynamic table JS updated