updated with new table structure