updated function trigger