construct_arrays libraries
added foreign key fields, and made create page