added singular value decomposition