first async draft
work with lengths of input output
deduplication