added delete function to the filecontroller