initial commit of modified code and example