I changed my original code a bit, you should rather store entity pointers instead of the whole entity struct grin