added regression folder and pinv function