jjk's fork, expanded with hunk-level operations