code that has been used for demo