Code of Sample Application