updated table structure and entities