a tangled bin of swift code