rename 'files' to 'extract' and add some tests