function and mockup