create the flattened facts the proper way