def PCA_custom(data, dims_rescaled_data=100):
    """
    returns: data transformed in 2 dims/columns + regenerated original data
    pass in: data as 2D NumPy array
    """
    import numpy as np
    from scipy import linalg as la
    data -= data.mean(axis=0)
    r = np.cov(data, rowvar=False)
    evals, evecs = la.eigh(r)
    idx = np.argsort(evals)[::-1]
    evecs = evecs[:, (idx)]
    evals = evals[idx]
    evecs = evecs[:, :dims_rescaled_data]
    return evecs, np.dot(evecs.T, data.T).T, evals
