might help to log ``result[-1]`` here