oops...think i have figured it out...well...it's working now anyway.
when i just pasted the 10 lines of code directly into terminal, it didn't work...but by pasting one at a time, it worked.
usually i can just paste all the lines in and it works.
in general, when using terminal, should you paste 1 line at a time?