Refactor of updateBlock method from Lib