rename function and updated example