algorithm penalty recovery