correcting code sample