renamed initial variables, realized i can accomplish the same thing with less code