Most of the work is done. Got the types and fk wotking correctly