An error displacement framework