towards code for PCAs with the appropriate sub-sample