updated re-former code