use setEntity var instead of addEntity