Set num_of_funs dynamically