add function as key to fix #1