changed input format in retrieving records(still brute force)