Buggy section 3 code