Updated sample2 so that it is shows more functionality.