changed foreign_key and added tests