added delete fuctions for entity and linked entity