started working on the demo function