I don't know what I was thinking... this works right (I think)