Part of the code for demo application