example from Instil's SOC scala course