make functions script-local