forgot to rename a variable. THIS version works