updated divmod fragment