val1 and val2 values are changing but are not correct yet