corrected the code example