modify new sample code