rename spec to function