using structs to actually pass functions oh god hayfever