refactor prev commit