Corporate debt restructurings: how does it work?