add the function for the demo