exception test improved & indexes with foreign keys added to db