election fileparsing logic