working version!

I deleted a couple of lines that seemed to be causing the problem