changed table and data structure