updating using values and constants