Adding code for the sample application