Thanks. I'm not getting the error anymore, but the pause function isn't working.
Do I need to use some sort of loop?