factor out captured pieces