this is *a* way that works ;) happy to consider alternatives