working eigendecomposition