some code sample corrections