Improved sample application