New AddEntity function