clean up some code using a last_relaxation() utility method