corrected table relationships