changed update block logic