added across and down logic to ul and added attr to lists