Improve function_spec