make bash functions' variables local