add handlerfunc pattern