added equals and toString in principal