you should probably have added a new module and copied all the additional code to the new module
then your code should work
the first 9 lines have to be right at the top of a code pane, so if you add to your existing, put above