numfiles added + bug fix