adjust script to arrange height of tables per row