change the records.size to result.size in search.rb as its more proper way