correct 2.21 code mistakes