semi-working match expressions