added delete handling to controllers