handles arbitrary num of files per container