modified sample_app