Add example for function with variables