Added utility method get_principal