example4: an ugly but works learning example