better memory handling
inserting the SVD code