added foreign keys to models