Delete mainfct