refactor records method to records_factor.rb