fixed to handle functions with no inputs