Quick & dirty: implementation with function pointers in structs