Full rectified code