sample code from jenkins book