Fixed this up. I need to turn this into a function.