small change to the way vals are passed in