added binary search method. modified line logging methods
modified binary search method to process duplicates