added delete entity functionality.