add trigger function, fix off function