Finished drafe of delete function

Need to confirm if values are used correctly