add setEntities method