added support for named foreign keys