opacity changes as a function of input