extended some functionality.  added a file counter.