modified to suit example