update to use entity pointers