added pseudoinverse