handles chunk boundaries, but needs work - too slow