add program example and fixes