added multiple file support (unfinished)