added delete class functionality