fixed badly formatted code samples in cookbook