course delete function works and refreshes itself