remove unneeded nextEntity variable