creating the data frame from the pcs
optimization works