adding sample code from website