how was the periodic table arranged