removed principal code