implemented #81 in Function handler