example program simplified