nbapi refactored to use generator
ensures separate uploads are kept separate