Updates samples
Updated sample code