Updated sample 2 according to PHP sample 2