refactor update-records-from-* functions to utilize a single codepath