explain maximizing algorithm. kill references to slots