Updated Sample Code