convert li to tables