corrected code sample