context calculated in every update