set public access to a function.