redo sample_app from tutorial