added to rectification program (it doesn't work yet)