Corrected code for example