add foreign keys to quantities