refractor just before class end