More involved sample code.