Added Rectify-Algorithm