add two methods for firstfile and secondfile procing