delete trigger and functionality