fixed method to add entities