placed a function call in the wrong spot, fixed now