made Pair seperate class, added code to process files and build index