added more sample code per requested