added delete and edit functions for masterlist and immediate cases